#!/bin/sh

# Copyright(c) 2011 OpenDomo Services SL. Licensed under GPL v3 or later

mkpkg()
{
   cd $1

   if test -x "Makefile"
   then
      make clean
      make
   fi

   rm -f pkg/*.tar.gz
   ./mkpkg.sh

   cp pkg/*tar.gz ../opendomo-distro/packages/
   cd ..
}


rm -f packages/*
cd ..


mkpkg opendomo-control
mkpkg opendomo-events  
mkpkg opendomo-vision
mkpkg opendomo-cgi  
mkpkg opendomo-discovery  
mkpkg opendomo-pkg
mkpkg opendomo-koloader
mkpkg opendomo-common

cd opendomo-distro/external
#./mkpkg_motion.sh
cd ../../..

